import { setToken, getToken, delToken } from "@/utils/storage";
export default {
  namespaced: true,
  state: {
    token: getToken() || null,
  },
  getters: {},
  mutations: {
    setToken(state, payLoad) {
      state.token = payLoad;
      setToken(payLoad);
    },
    logout(state) {
      state.token = null;
      delToken();
    },
  },
};
